
import 'dart:ui';

import 'package:df/utils/color_utils.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

/// https://github.com/ponnamkarthik/FlutterToast/blob/master/example/lib/toast_no_context.dart
class ToastUtils  {

  static void cancel() {
    Fluttertoast.cancel();
  }

  static void show(String msg) {
    Fluttertoast.showToast(//https://github.com/ponnamkarthik/FlutterToast/blob/master/example/lib/toast_no_context.dart
      msg: msg,
      gravity: ToastGravity.CENTER,
      toastLength: Toast.LENGTH_LONG,
      // backgroundColor: HexColor('#BB000000'),
      backgroundColor: Color(0xBB000000),
      textColor: Colors.white,
      fontSize: 18.0,

      //timeInSecForIosWeb: 1,
      //webShowClose	false (bool)	false
      //webBgColor	String (hex Color)	linear-gradient(to right, #00b09b, #96c93d)
      //webPosition	String (left, center or right)	right
    );
  }
}